package coco.wx.com.module.question.entity;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author srx
 * @since 2020-10-23
 */
@Data
@EqualsAndHashCode
@TableName("t_m_question")
public class Question implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 题目ID
     */
    @TableId
    private Long questionId;

    /**
     * 标题
     */
    private String title;

    /**
     * 题干
     */
    private String question;

    /**
     * 类型 1选择题  2填空题
     */
    private Integer type;

    /**
     * 排序
     */
    private Long sort;

    /**
     * 分类
     */
    private String classification;

    /**
     * 备注
     */
    private String remark;

    /**
     * 是否多选 1是 0不是
     */
    private Boolean multiChoice;

    /**
     * 分数
     */
    private Double scores;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField( fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField( fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    List<Option> options;
}
